<div id="bentrai">
  <div id="main-content">
    <div id="deal-buy" class="box">
      <div class="box-top"></div>
      <div class="box-content">
        <div class="head">
          <h2>Giỏ hàng
            <!--Your Purchase-->
          </h2>
        </div>
        <form action="" method="post" name="frmCart" id="frmCart">
        <div class="sect">
          <table class="order-table">
            <tbody>
              <tr class="sects">
                <th class="deal-buy-desc"></th>
                <th class="deal-buy-desc">Sản phẩm</th>
                <th class="deal-buy-quantity">Số lượng</th>
                <th class="deal-buy-price">Ðơn giá (<span class="money">VNÐ</span>)</th>
                <th class="deal-buy-total">Thành tiền (<span class="money">VNÐ</span>)</th>
                <th class="remove"></th>
              </tr>
              <?php if($cart->getTotalItems() > 0){ ?>
              <?php foreach($cart->getItems() AS $item): ?>
              <tr>
                <td class="deal-buy-desc"><a target="blank" href="<?php echo $item->url; ?>"><img src="<?php echo $item->image; ?>" /></a></td>
                <td class="deal-buy-desc"><a target="blank" href="<?php echo $item->url; ?>"><?php echo $item->product_name; ?></a></td>
                <td class="deal-buy-quantity">
            <input class="input-textf-input" maxlength="4" name="quantity[<?php echo $item->product_cart_id; ?>]" value="<?php echo $item->quantity; ?>" ff="0" class="deal-buy-quantity-input" type="text">

                  <!--<br /><span style="font-size:12px;color:gray;">                    at most 10 pieces
                                        </span>--></td>
                <td class="deal-buy-price"><span id="deal-buy-price"><?php echo number_format(sprintf("%01.2f", $item->price), 0, ',', '.'); ?> VNĐ
                  </span></td>
                <td class="deal-buy-total"><span id="deal-buy-total"><?php echo number_format(sprintf("%01.2f", $item->price * $item->quantity), 0, ',', '.'); ?> VNĐ</span>
                  </td>
                  <th class="remove"><a onclick="cart_remove('<?php echo $item->product_cart_id; ?>');" href="javascript:void(0);">Xóa</a></th>
              </tr>
              <?php endforeach; ?>
              <?php } ?>
              <tr class="order-total">
                <td class="deal-buy-desc"></td>
                <td class="deal-buy-quantity"></td>
                <td class="deal-buy-prices" nowrap="nowrap"><strong>Tổng số tiền</strong></td>
                <td class="deal-buy-totals" colspan="2"><strong id="deal-buy-total-t"><?php echo number_format(sprintf("%01.2f", $cart->getTotalPrice()), 0, ',', '.'); ?> </strong>&nbsp;<span class="money">VNÐ</span></td>
              </tr>
            </tbody>
          </table>
          <div class="field mobile">&nbsp;</div>
          <div class="form-submitdy">
            <input type="hidden" name="product_cart_id" id="product_id" value="" />
            <input type="hidden" name="logined" id="confirm_logined" value="1" />
            <input class="formbutton" name="buy" value="Cập nhật giỏ hàng" type="button" onclick="cart_update();">
            <input class="formbutton" name="buy" value="Ðồng ý mua hàng" type="button" onclick="cart_confirm();">
          </div>
        </div>
        </form>
      </div>
    </div>
    <div class="box-bottom"></div>
  </div>
</div>
